<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="author" content="王劲翔">
    <title>Document</title>
</head>

<body>
    <script>
        function getMax(arr) {
            return Math.max(...arr)
        }
        let arr = [1, 6, 2, 8, 11, 5]
        let max = getMax(arr)
        // console.log(`原数组：${arr}`);
        // console.log(`最大值为：${max}`);
    </script>
</body>

</html>